
const { resolve } = require('path')
const path = require('path')
const basePath = resolve(__dirname, '../output')
const sourceDir = resolve(__dirname, '../dist')
const sourceDirJS = resolve(sourceDir, 'static/js')

const allDirectory = resolve(basePath, 'buyerPublish')

const targetArr = [
  {
    name: 'production',
    baseTargetPath: resolve(basePath, 'production'),
    replaceArr: [
      // {
      //   old: 'http://xzbadmin.yhemall.com:18080',
      //   new: 'http://121.199.174.232:18080',
      // },
      // {
      //   old: 'ws://xzbadmin.yhemall.com:18080/api/im/lili/webSocket',
      //   new: 'ws://121.199.174.232:18080/api/im/lili/webSocket',
      // },
    ]
  },
  {
    name: 'test',
    baseTargetPath: resolve(basePath, 'test'),
    replaceArr: [
      {
        old: 'http://xzbadmin.yhemall.com:18080',
        new: 'http://121.199.174.232:18080',
      },
      {
        old: 'ws://xzbadmin.yhemall.com:18080/api/im/lili/webSocket',
        new: 'ws://121.199.174.232:18080/api/im/lili/webSocket',
      },
      {
        old: 'http://h5.yhemall.com:28080',
        new: 'http://121.199.174.232:18084',
      },
    ]
  },
  {
    name: 'localhost',
    baseTargetPath: resolve(basePath, 'localhost'),
    replaceArr: [
      {
        old: 'http://xzbadmin.yhemall.com:18080',
        new: 'http://localhost:18080',
      },
      {
        old: 'ws://xzbadmin.yhemall.com:18080/api/im/lili/webSocket',
        new: 'ws://localhost:18080/api/im/lili/webSocket',
      },
      {
        old: 'http://h5.yhemall.com:28080',
        new: 'http://localhost:18084',
      },
    ]
  },
]

module.exports = {
    basePath,
    sourceDir,
    sourceDirJS,
    targetArr,
    allDirectory
}